<script setup lang="ts">
  import { ref } from 'vue'
  import type { Node } from '@vue-flow/core'
  import BaseNode from '../base-node/index.vue'
  import ItemBar from '../components/item-bar.vue'
  const props = defineProps<Node>()

  const nodeInfo = ref<Node>({
    ...props,
    id: '8',
    type: 'agent',
    data: {
      label: 'Agent',
      icon: 'material-symbols:smart-toy-outline',
      content: {
        name: '智能问数',
        ...props.data.content,
      },
      desc: '你好，我是一个智能问数，我只能有1个测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试',
      ...props.data,
    },
    style: { background: '#fff', border: '1px solid  red', borderRadius: '4px' },
  })
</script>

<template>
  <BaseNode :meta="nodeInfo">
    <div class="box_shirt p-2">
      <ItemBar :item="{ ...nodeInfo.data.content, label: nodeInfo.data.label }" />
    </div>
  </BaseNode>
</template>

<style scoped lang="less">
  .box {
    min-width: 120px;
    min-height: 40px;
    line-height: 40px;
    text-align: center;
  }
</style>
<style scoped lang="less">
  .box {
    min-width: 120px;
    min-height: 40px;
    line-height: 40px;
    text-align: center;
  }
</style>

material-symbols:database-outline
